#ifndef APP_DEV_H
#define APP_DEV_H

#include "main.h"

void app_dev_init(void);
void app_dev_task(void);
unsigned char app_dev_is_ok_to_sleep(void);

typedef struct {
    unsigned char jam;  //卡粮故障
    unsigned char bat_low;    //低电量
    unsigned char bat_off;    //低电量关机   
    unsigned int real_bat;          //实时电量  单位mv
    unsigned char overcur;  //过流故障 
    unsigned int cur_ad; //当前电流 AD
    unsigned int cur;   //当前电流 单位mA
} app_alarm_mgr_t;

typedef struct {
    unsigned char state;  //老化状态
} app_burn_mgr_t;

void app_wakeup_alarm_led_task(void);
void app_set_alarm_jam(unsigned char value);
void app_set_alarm_bat_low(unsigned char value);

extern app_alarm_mgr_t sg_alarm_mgr;
extern app_burn_mgr_t sg_burn_mgr;

#endif